import 'dart:convert';

/// uid : "5b304ca93fc6f"
/// nickName : "大松啊"
/// pic : "https://c360-o2o.c360dn.com/moren.jpg"
/// num : "0"
/// isVIP : true
/// token : "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJpc3MiOiJLQU5OWS1BUEkiLCJhdWQiOiJBUFAiLCJpYXQiOjE3MDE0MjY1ODEsIm5iZiI6MTcwMTQyNjU4MSwiZXhwIjoxNzAxNDQ4MTgxLCJqdGkiOiI1MTYyMyIsImlkIjoiNWIzMDRjYTkzZmM2ZiIsInVpZCI6IjViMzA0Y2E5M2ZjNmYifQ.QsQyOUgu8ezUQTdJ65DCfYFtG5OH5GSIvf_Txrv6BK6EwqXQBPT3CSvFNhZVLhgTYja3yBlpTAG79a9uuLqDREQK1aamy6DqrW1YGvuvLIvuJBYGUpdbbZn4qiVmccJ_i1YfXu_QoCKFcsfycvaILcVtlzCZFGj7bkKd0EfDlgw"

CMUserLoginDto dataFromJson(String str) => CMUserLoginDto.fromJson(json.decode(str));

String dataToJson(CMUserLoginDto data) => json.encode(data.toJson());

class CMUserLoginDto {
  CMUserLoginDto({
    String? uid,
    String? nickName,
    String? pic,
    String? num,
    bool? isVIP,
    String? token,
  }) {
    _uid = uid;
    _nickName = nickName;
    _pic = pic;
    _num = num;
    _isVIP = isVIP;
    _token = token;
  }

  CMUserLoginDto.fromJson(dynamic json) {
    _uid = json['uid'];
    _nickName = json['nickName'];
    _pic = json['pic'];
    _num = json['num'];
    _isVIP = json['isVIP'];
    _token = json['token'];
  }

  String? _uid;
  String? _nickName;
  String? _pic;
  String? _num;
  bool? _isVIP;
  String? _token;

  CMUserLoginDto copyWith({
    String? uid,
    String? nickName,
    String? pic,
    String? num,
    bool? isVIP,
    String? token,
  }) =>
      CMUserLoginDto(
        uid: uid ?? _uid,
        nickName: nickName ?? _nickName,
        pic: pic ?? _pic,
        num: num ?? _num,
        isVIP: isVIP ?? _isVIP,
        token: token ?? _token,
      );

  String? get uid => _uid;

  String? get nickName => _nickName;

  String? get pic => _pic;

  String? get num => _num;

  bool? get isVIP => _isVIP;

  String? get token => _token;

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['uid'] = _uid;
    map['nickName'] = _nickName;
    map['pic'] = _pic;
    map['num'] = _num;
    map['isVIP'] = _isVIP;
    map['token'] = _token;
    return map;
  }

  @override
  String toString() {
    return 'CMUserLoginDto{_uid: $_uid, _nickName: $_nickName, _pic: $_pic, _num: $_num, _isVIP: $_isVIP, _token: $_token}';
  }
}